<div class="page">
	<div class="page-head">
		<h1 class="font-thin h4">工程管理</h1>
	</div>
	<div class="client-tab">
		<span ui-sref="app.client.client_editNew">基本信息</span>
		<span ui-sref="app.client.customerrepresentative_manageNew">客户代表</span>
		<span ui-sref="app.client.goodstype_manageNew">货物分类</span>
		<span ui-sref="app.client.goods_manageNew">货物</span>
		<span ui-sref="app.client.settleManagentNew">结算方</span>
		<span ui-sref="app.client.lineprice_manageNew">线路报价</span>
		<span  class="client-tab-cur" >工程</span>
        <span ui-sref="app.client.clientinfo_manageNew">客户资料</span>
        <span ui-sref="app.client.returnPeriodNew">对账回款周期</span>
	</div>
	<div class="page-body">
        <form name="step7" id="projectForm" class="form-validation" novalidate ng-controller="projectManagentNewController">
            <!--form-horizontal-->
            <div class="list-body">
                <div class="client-company">						
                    <label class="control-label pull-left client-companyLabel">客户单位：</label>
                    <div class="col-md-2 form-group">
                        <label class="control-label pull-left client-companyDetail">{{clientName}}</label>
                    </div>
				</div>
                <div class="list-query">
                    <div class="query-terms" ng-if="queryTermsFilterList[0].visible">
                        <label class="control-label pull-left">工程编号：</label>
                        <input type="text" class="form-control input-sm query-term" id="fa-search" ng-model="queryTerms.projectCode" placeholder="请输入工程编号" name="fa-search" id="projectCode">
                    </div>

                    <div class="query-terms" ng-if="queryTermsFilterList[1].visible">
                        <label class="control-label pull-left">工程名称：</label>
                        <input type="text" class="form-control input-sm query-term" id="fa-searchz" ng-model="queryTerms.projectName" placeholder="请输入工程名称" name="fa-searchz" id="projectName">
                    </div>

                    <div class="query-terms">
                        <label class="control-label pull-left"></label>  
                        <button ng-click="query()" class="btn tms-btn tms-btn-search" ng-class="{'disabled':querying}" ng-disabled="querying" id="query">
                            <i class="fa fa-search" ng-show="!querying"></i>
                            <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                            <span ng-show="!querying">查询</span>
                            <span ng-show="querying">查询中...</span>
                        </button>
                    </div>   
                </div>

                <div class="list-btn-area">
                     <button data-toggle="modal" data-target="#project" class="btn tms-btn tms-btn-add" ng-click="projectAdd()" id="add">添加</button>
                     <div class="list-filter-container">
                        <tms-list-filter 
                            tab-head-filter="tabHeadFilter(item)"
                            query-terms-filter-list="queryTermsFilterList"
                            tab-head-filter-list="tabHeadFilterList"
                        ></tms-list-filter>
                    </div>
                </div>

                 <div class="list-table">
                    <div class="table-responsive">
                        <div ui-grid="gridOptions" ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style="height:{{heightA}}px; overflow:hidden; min-width:1650px;">
                            <div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
                        </div>
                    </div>
                </div>
               
            </div>

                <!-- Modal -->
                <ng-form name="projectForm" class="modal fade" id="project" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
                    <div class="modal-dialog modal-lg">
                        <div class="modal-content">
                            <div class="modal-header client-modalHeader">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" id="close">&times;</span></button>
                                <h4 class="modal-title" id="myModalLabel">{{detail.title}}</h4>
                            </div>
                            <div class="modal-body">
                                <table class=" table-bordered client-table">
									<tr>
										<td class="client-td-left"><span class="text-danger">*</span>工程名称：</td>
										<td class="client-td-right">
                                            <input type="text" class="form-control input-sm ipt-3" ng-model="detail.projectNameBox" required placeholder="请填写工程名称" name="projectNameBox" id="projectNameBox">
										</td>
									</tr>
									<tr>
										<td class="client-td-left"><span class="text-danger">*</span>工程编号：</td>
										<td class="client-td-right">
                                            <input type="text" class="form-control input-sm ipt-3" ng-model="detail.projectCodeBox" placeholder="请填写工程编号" name="projectCodeBox" required id="projectCodeBox">
										</td>
									</tr>
									<tr>
										<td class="client-td-left"><span class="text-danger">*</span>工程总量：</td>
										<td class="client-td-right project-selectMa">
                                            <input type="text" ng-pattern="/(^[0-9]\d*$)/" class="form-control input-sm ipt-3" ng-model="detail.maxValue" value="0" placeholder="请填写工程总量" name="maxValue" maxlength="7" required id="maxValue">				
                                            <select class="form-control input-sm ipt-2 tms-select" ng-model="detail.maxUnit" ng-options="x.value as x.text for x in maxUnitsList" name="maxUnit" required>
                                                <option value="">请选择</option>
                                            </select>                                  
                                        </td>
									</tr>
                                    <tr>
										<td class="client-td-left">收货单位：</td>
										<td class="client-td-right">
                                            <div angucomplete-alt id="settleContact" placeholder="" pause="100" selected-object="settleSelect" remote-api-handler="searchSettle" search-fields="name" title-field="name" minlength="1" input-class="form-control form-control-small input-sm ipt-3" initial-value="settleName" match-class="highlight"></div>
										</td>
									</tr>
                                    <tr>
										<td class="client-td-left">收货人：</td>
										<td class="client-td-right">
                                            <input type="tel" class="form-control input-sm ipt-3" ng-model="detail.settleContact" placeholder="请填写收货人" name="settleContact" id="settleContactPerson">
										</td>
									</tr>
                                    <tr>
										<td class="client-td-left">收货人电话：</td>
										<td class="client-td-right">
                                            <input type="tel" class="form-control input-sm ipt-3" ng-model="detail.settlePhone" placeholder="请填写收货人电话" name="settlePhone" ng-pattern="/^1\d{10}$/" id="settlePhone">
										</td>
									</tr>
                                    <tr>
										<td class="client-td-left">工程说明：</td>
										<td class="client-td-right">
                                            <!--<div id="project-textarea" class="textarea" contenteditable="true" ng-model="detail.remarks" placeholder="请填写工程说明" name="remarks"></div>-->
                                            <textarea class="form-control project-textarea" ng-model="detail.remarks" placeholder="请填写工程说明" name="remarks"></textarea>
										</td>
									</tr>

                                    <!--<tr>
										<td class="client-td-left"></td>
										<td class="client-td-right">
                                            <button type="button" class="btn btn-default" data-dismiss="modal" id="cancel">取消</button>
                                            <button type="button" class="btn btn-primary" ng-disabled="!projectForm.$valid" ng-click="detail.projectSave()" id="save">保存</button>
										</td>
									</tr>-->

								</table>

                                <div class="clientIfo-bottom tms-editBtn">
                                    <button type="button" class="btn tms-btn tms-btn-save" ng-disabled="!projectForm.$valid" ng-click="detail.projectSave()" id="save">保存</button>
                                    <button type="button" class="btn tms-btn tms-btn-miss" data-dismiss="modal" id="cancel">取消</button>
                                </div>

                            </div>
                        </div>
                    </div>
                </ng-form>
            
        </form>
	</div>
	
</div>